#ifndef SEQUENCEITEMEDITOR_H
#define SEQUENCEITEMEDITOR_H

#include <QWidget>
#include <QString>

#include "sequenceitem.h"

namespace Ui {
class SequenceItemEditor;
}

class QAbstractItemModel;

class SequenceItemEditor : public QWidget
{
   Q_OBJECT

public:
   explicit SequenceItemEditor( QAbstractItemModel * mediaModel,
                                QAbstractItemModel *lightModel,
                                QWidget *parent = 0);
   ~SequenceItemEditor();

   int nextItemIndex();
   void setNextItemIndex( int index);

   int delayFromPreviousMs();
   void setDelayFromPrevious( int millisec);

   SequenceItem::eventType  eventType();
   void setEventType( SequenceItem::eventType type);

   QString  targetLabel();
   void setTargetLabel( const QString & label);

private:
   Ui::SequenceItemEditor *ui;

   QAbstractItemModel *m_mediaModel;
   QAbstractItemModel *m_lightModel;

private slots:
   void onEventTypeComboChanged(int index);
   void onDelayManualCheckClicked(bool newState);
   void onNextIsFollowingCheckClicked(bool newState);

};

#endif // SEQUENCEITEMEDITOR_H
